void gdk_wayland_surface_commit (GdkSurface *surface);
void gdk_wayland_surface_notify_committed (GdkSurface *surface);
void gdk_wayland_surface_request_frame (GdkSurface *surface);
+gboolean gdk_wayland_surface_has_surface (GdkSurface *surface);
void gdk_wayland_surface_attach_image (GdkSurface *surface,
cairo_surface_t *cairo_surface,
const cairo_region_t *damage);
impl->awaiting_frame = TRUE;
}
+gboolean
+gdk_wayland_surface_has_surface (GdkSurface *surface)
+{
+ GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
+
+ return !!impl->display_server.wl_surface;
+}
+
void
gdk_wayland_surface_commit (GdkSurface *surface)
{
gdk_surface_invalidate_rect (surface, NULL);
}
+static void
+maybe_notify_mapped (GdkSurface *surface)
+{
+ if (surface->destroyed)
+ return;
+
+ if (!GDK_SURFACE_IS_MAPPED (surface))
+ {
+ gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
+ gdk_surface_invalidate_rect (surface, NULL);
+ }
+}
+
static void
gdk_wayland_surface_configure (GdkSurface *surface)
{
gdk_surface_thaw_updates (surface);
impl->initial_configure_received = TRUE;
impl->pending.is_initial_configure = TRUE;
+ maybe_notify_mapped (surface);
}
impl->has_uncommitted_ack_configure = TRUE;
return TRUE;
}
-static void
-maybe_notify_mapped (GdkSurface *surface)
-{
- if (surface->destroyed)
- return;
-
- if (!GDK_SURFACE_IS_MAPPED (surface))
- {
- gdk_synthesize_surface_state (surface, GDK_TOPLEVEL_STATE_WITHDRAWN, 0);
- gdk_surface_invalidate_rect (surface, NULL);
- }
-}
-
static void
gdk_wayland_surface_map_popup (GdkSurface *surface,
int width,
impl->popup.unconstrained_width = width;
impl->popup.unconstrained_height = height;
impl->mapped = TRUE;
-
- maybe_notify_mapped (surface);
}
static void
impl->toplevel.layout = gdk_toplevel_layout_copy (layout);
gdk_wayland_surface_show (surface, FALSE);
- maybe_notify_mapped (surface);
display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
callback = wl_display_sync (display_wayland->wl_display);